home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / comm / cnet / time_clock.lha / timerclock / TimeClockP < prev    next >
Text File  |  1997-03-13  |  2KB  |  30 lines

  1. /**************************************************************************\
  2.    $VER: TimeClock PortCheck, v2.00 (14-Mar-97) by Dotoran of Frontiers!
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR
  5. a=sourceline(2);parse var a . ", "ver" ("vdate")" .;tr=transmit;gu=getuser
  6. a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
  7. parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
  8.  
  9. gu 40 ; id=result ; if getclip("CDtimer"id)getclip("TDtimer"id)="" then exit
  10.  
  11. gu 23 ; port=result ; v1=getclip("CDtimer"id) ; v2=getclip("TDtimer"id)
  12.  
  13. if v1>"" then do ; parse var v1 a1 a2
  14.   if port~=a1 then a1=port ; v=a1||a2 ; call setclip("CDtimer"id,v) ; end
  15.  
  16. if v2>"" then do ; parse var v2 a1 a2
  17.   if port~=a1 then a1=port ; v=a1||a2 ; call setclip("TDtimer"id,v) ; end
  18.  
  19. exit
  20. CHECK:;if ARG() & ARG(1)~="###PANIC" then return ARG(1)
  21.   getcarrier;if result="TRUE" then if ARG() then return ARG(1);else return
  22.   logentry "Lost Carrier!!";bufferflush;exit
  23. SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
  24.   e2="  Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
  25.   logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
  26.   do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
  27.   bufferflush
  28. /**************************************************************************\
  29. \****************************************** Frontiers BBS (716)/823-9892 **/
  30.